package com.xxxy.controller;

import com.xxxy.commonResult.CommonResult;
import com.xxxy.log.Log;
import com.xxxy.model.Faculty;
import com.xxxy.response.StudentResponse;
import com.xxxy.service.FacultyService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author sjh
 * @date 2022/2/3 12:33
 */
@RestController
@Api(tags = "学院管理")
@RequestMapping("/faculty")
public class FacultyController {

    @Autowired
    FacultyService facultyService;

    @Log(module = "学院管理", description = "获取学院列表")
    @GetMapping(value = "/list")
    @ApiOperation(value = "学院列表")
    public CommonResult<List<Faculty>> list() {
        return CommonResult.success(facultyService.list());
    }
}
